package com.tencreat.domain.mall.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.enums.BalanceBusinessType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

@ApiModel("余额记录")
@Data
public class ResBalanceRecordVO {
//    private Long id;


    @Excel(name = "用户ID",sort = 1)
    @ApiModelProperty("用户ID")
    private Long uuid;

    @Excel(name = "手机号码",sort = 2)
    @ApiModelProperty("手机号码")
    private String mobile;

    @Excel(name = "变化前余额",sort = 5)
    @ApiModelProperty("变化前余额")
    private BigDecimal balanceBefore;

    @Excel(name = "变化后余额",sort = 7)
    @ApiModelProperty("变化后余额")
    private BigDecimal balance;

    private String referrerUuid;

    @Excel(name = "收支类型",sort = 3)
    @ApiModelProperty("收支类型")
    private String type;


    @Excel(name = "业务类型",sort = 4, enumType = true)
    @ApiModelProperty("业务类型")
    private BalanceBusinessType businessType;

    @Excel(name = "变化余额",sort = 6)
    @ApiModelProperty("变化余额")
    private BigDecimal amount;

    @Excel(name = "备注",sort = 8)
    @ApiModelProperty("备注")
    private String remarks;

    @Excel(name = "时间",dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 9)
    @ApiModelProperty("时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @NotNull(message = "分页页码不能为空")
    private Integer pageNum;

    @NotNull(message = "分页大小不能为空")
    private Integer pageSize;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("变动类型")
    private String businessTypeName;

    @ApiModelProperty("供应商名称")
    private String supplierName;

    private Long goodsId;

    private Long normsId;

    private String source;

    @ApiModelProperty("店铺商家名称")
    private String storeName;
}
